{if $smarty.const.PATH}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>{$config['website']['title']}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="{$template}/heaven.css" rel="stylesheet" type="text/css" media="screen" />
		<link href="{$template}/signin.css" rel="stylesheet" type="text/css" media="screen" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
		<script src="{$template}/signin.js" type="text/javascript"></script>
		<script type="text/javascript">
			var RecaptchaOptions =
			{
				theme : '{$config['recaptcha']['theme']}'
			};

			var timeout	= 100;
			var closetimer	= 0;
			var ddmenuitem	= 0;

			function mopen(id)
			{	
				mcancelclosetime();
				if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
				ddmenuitem = document.getElementById(id);
				ddmenuitem.style.visibility = 'visible';
			}
			function mclose()
			{
				if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
			}
			function mclosetime()
			{
				closetimer = window.setTimeout(mclose, timeout);
			}
			function mcancelclosetime()
			{
				if(closetimer)
				{
					window.clearTimeout(closetimer);
					closetimer = null;
				}
			}
			document.onclick = mclose; 
		</script>
		{$scripts}
	</head>
	
	<body>
		<div id="wrapper">
			<div id="navigation">
				<ul id="menu">
					<li><a href="#" onmouseover="mopen('main')" onmouseout="mclosetime()">Main</a>
						<div id="main" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
							<a href="{$path}/home/">Home</a>
							<a href="{$path}/news/">News</a>
						</div>
					</li>
					<li><a href="#" onmouseover="mopen('account')" onmouseout="mclosetime()">Account</a>
						<div id="account" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
						{if !$logged}
							<a href="#" class="signin">Login</a>
							<a href="{$path}/account/register/">Register</a>
						{else}
							<a href="{$path}/account/">Management</a>
							<a href="{$path}/account/logout/">Logout</a>
						{/if}
						</div>
					</li>
					<fieldset id="signin_menu">
						<form method="post" id="signin" action="{$path}/account/check/">
							<label for="username">Account Name</label>
							<input id="username" name="account_name" value="" title="account name" tabindex="4" type="password" />
							</p>
							<p>
							<label for="password">Password</label>
							<input id="password" name="account_password" value="" title="password" tabindex="5" type="password">
							</p>
							<p class="remember">
							<input id="signin_submit" value="Sign in" tabindex="6" type="submit">
							<span style="float:right;"><a href="#" id="resend_password_link">Forgot something?</a></span>
							</p>
						</form>
					</fieldset>
					<li><a href="#" onmouseover="mopen('community')" onmouseout="mclosetime()">Community</a>
					<div id="community" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
					<a href="{$path}/search/">Characters</a>
					<a href="{$path}/highscores/">Highscores</a>
					<a href="{$path}/houses/">Houses</a>
					</div>
					{if $config['website']['forumStatus']}
					<li><a href="{$config['website']['forum']}">Forum</a></li>
					{/if}
					<li><a href="#" onmouseover="mopen('store')" onmouseout="mclosetime()">Store</a>
						<div id="store" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
							<a href="{$path}/store/browse/">Browse</a>
							<a href="{$path}/store/points/">Buy Points</a>
						</div>
					</li>
				</ul>
			</div>
			
			<br class="clear" />
			<div id="content">
			<br />
			{$main}
			</div>
			<br />
			<div id="footer">
			{$footer}<br />
			Copyright &copy; 2011 {$config['server']['name']}.<br />
			<small>Page rendered in: {$render}s</small><br /><br />
			<small><a href="{$path}/credits/">Archez AAC credits.</a></small>
			</div>
			
		</div>
	</body>
</html>
{/if}